Is there a way to create a schedule with attached escalation?

Currently I am using the API methods to create a bunch of objects. I have created users, teams and linked them together, escalation policy and linked it to the team, service and linked it to the team, and a schedule and linked to team.
However, when going onto the schdule view, you can still add the escalation policy to it, but how can this be achieved in the API call?
I have tried the below, trying escalation_policy_reference as well, and under both the escalation body, and the restrictions body

“targets”: [
{
“type”: “escalation_policy”,
“id”: “{escal ID}”
}

Is it possible to create a link as such in the API call?

This would only be possible via the escalation policy API endpoints, not via the schedules API endpoints.

Thanks. Would it be under the targets for the rules, or as a separate block for schedules, similar to teams?

Got it working thanks. Added to escalation PUT method, under targets, schedule id and type of schedule_reference

1 Like